<?php
/**
 * Created by PhpStorm.
 * User: fengzi
 * Date: 2019/6/3
 * Time: 14:34
 */

namespace app\vehicle\logic;
use app\common\model\Donation;
use app\common\model\User;
class donationLogic
{
    public function getArticleList($data){
        $time = time();
        $where[] = ['status','eq',1];
        $list = Donation::where($where)->order('create_time desc')->page($data['page'],100)->select();
        return $list;
    }
    public function getArticleInfo($data,$user_id){
        Donation::where('id','eq',$data['id'])->setInc('read_num',1);
        $info = Donation::get($data['id']);
        return $info;
    }
}